﻿using B.S.Shop.Domain;
using Microsoft.EntityFrameworkCore;

namespace B.S.Shop.Infartructrue
{
    public class MyDbContext : DbContext
    {
        public MyDbContext(DbContextOptions options) : base(options)
        {
        }

       public DbSet<BossClass> BossClasses { get; set; }

        public DbSet<OrderClass> orderClasses { get; set; }

        public DbSet<ShopClass> shopClasses { get; set; }

        public DbSet<ShopNameClass> shopNameClasses { get; set; }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.Entity<ShopClass>().HasQueryFilter(a => !a.IsDel);
        }
    }
}
